# links = [("Tom","Dick"),("Dick","Harry"),("Tom","Larry"),("Bob","Leroy"),("Bob","Earl")]
# parents, children = zip(*links)
# root_nodes = {x for x in parents if x not in children}
# for node in root_nodes:
#     links.append(('Root', node))


# print(links)

# def get_nodes(node):
#     d = {}
#     d['name'] = node
#     children = get_children(node)
#     if children:
#         d['children'] = [get_nodes(child) for child in children]
#     return d

# def get_children(node):
#     return [x[1] for x in links if x[0] == node]

# tree = get_nodes('Root')

# print(tree)

# mylist = [{'id': 1, 'name': '在线课程', 'pid': 0, 'child': [{'id': 2, 'name': 'python', 'pid': 1}]}, {'id': 3, 'name': '语文', 'pid': 0}]

# def list_dic(d,n_tab=-1):
#     if isinstance(d, list):
#         for i in d:
#             list_dic(i,n_tab)
#     elif isinstance(d, dict):
#         n_tab+=1
#         for key, value in d.items():
#             print("{}{}".format("\t"*n_tab, key))
#             list_dic(value, n_tab)
#     else:
#         print("{}{}".format("\t"*n_tab,d))


# list_dic(mylist)


import snowflake.client

print(snowflake.client.get_stats())

print(snowflake.client.get_guid())


# print(snowid[1:42])

# print(snowid[43:48])

# print(int(snowid[42:47],2))

